import request from '@/utils/request'

// 查询物料入库申请列表
export function listMaterialInboundApply(query) {
  return request({
    url: '/tas/MaterialInboundApply/list',
    method: 'get',
    params: query
  })
}

// 查询物料入库申请详细
export function getMaterialInboundApply(applyId) {
  return request({
    url: '/tas/MaterialInboundApply/' + applyId,
    method: 'get'
  })
}

// 新增物料入库申请
export function addMaterialInboundApply(data) {
  return request({
    url: '/tas/MaterialInboundApply',
    method: 'post',
    data: data
  })
}

// 修改物料入库申请
export function updateMaterialInboundApply(data) {
  return request({
    url: '/tas/MaterialInboundApply',
    method: 'put',
    data: data
  })
}

// 删除物料入库申请
export function delMaterialInboundApply(applyId) {
  return request({
    url: '/tas/MaterialInboundApply/' + applyId,
    method: 'delete'
  })
}

// 查询物料不分页列表
export function listMaterial(query) {
  return request({
    url: '/mwm/inventory/material/getlist',
    method: 'get',
    params: query
  })
}

// 查询仓库不分页列表
export function listWarehouse(query) {
  return request({
    url: '/mwm/inventory/warehouse/getlist',
    method: 'get',
    params: query
  })
} 

// 查询库位不分页列表
export function listLocation(query) {
  return request({
    url: '/mwm/inventory/location/getlist',
    method: 'get',  
    params: query
  })
}


// 查询用户不分页列表 
export function listUserAll(query) {
  return request({
    url: '/tas/MaterialInboundApply/user/getlist',
    method: 'get',
    params: query
  })
}

// 查询供应商不分页列表
export function listSupplier(query) {
  return request({
    url: '/tas/MaterialInboundApply/supplier/getlist',
    method: 'get',
    params: query
  })
}

// 查询工单不分页列表
export function listWorkorder(query) {
  return request({
    url: '/pm/inspection/workorder/getlist',
    method: 'get',
    params: query
  })
}
